<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://www.extremecomponents.org" prefix="ec"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<html>
<head>
<title>物业管理系统</title>
<link href="${ctx}/styles/login.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="${ctx}/styles/style.css" />
<script language="JavaScript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript" src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript">
        if(findFrame("main")!=null){
      findFrame("main").parent.closeforwindow();
        }
		function formSubmit(id){
	     	var form = document.getElementById(id);
	     	form.submit();
	     }

		 function onKeyUpSubmit(id) {
	        if (event.keyCode == 13)
	        {
	           //formSubmit(id);
	           buildUsername();

	        }
	    }

		function buildUsername() {

			if (document.loginForm.username.value == "" ) {
			alert("Please enter all fileds!");
			return false;
			}

			var userName = document.loginForm.username.value;

			document.loginForm.submit();
		}

</script>
</head>

<body>
<form name="loginForm" id="loginForm" method="post" action="${ctx}/loginAction.do?method=login">
<input type="hidden" name="tempUrlForward" value="${tempUrlForward}">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td id="block">
      <table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td id="login"><table width="100%" border="0" cellspacing="10" cellpadding="0">
          <tr>
            <td class="font_bold">用户名：</td>
                <td><input type="input" autocomplete="off" onKeyUp="onKeyUpSubmit('loginForm')" name="username"  value="" ></td>
              </tr>
            <td class="font_bold">密&nbsp;&nbsp;&nbsp;<img name="" src="" width="1" height="1" alt="">&nbsp;码：</td>
                <td><input onKeyUp="onKeyUpSubmit('loginForm')" name="password" value="123456" type="password"></td>
              </tr>
            <!-- td class="font_bold">验证码：</td>
                <td><input onKeyUp="onKeyUpSubmit('loginForm')" name="j_webx_verifyCode" type="text" size="10">
		<img src="./verifyCode.jpg"/></td-->
              </tr>
          <tr>
            <td>&nbsp;</td>
                <td><br>
              <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><table border="0" cellpadding="0" cellspacing="0" >
                    <tr>
                      <td class="buttonOffLeft" id="btn1_11"></td>
                            <td class="buttonOffMiddle" id="btn1_12" onClick="javascript:buildUsername()" onMouseOver="btn_change_over(1)" onMouseOut="btn_change_out(1)"><img src="images/ico_login.gif" border="0" align="texttop"> 登 录</td>
                            <td class="buttonOffRight" id="btn1_13"></td>
                          </tr>
                    </table></td>
                      <td width="5"></td>
                      <td><table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td class="buttonOffLeft" id="btn1_21"></td>
                            <td class="buttonOffMiddle" id="btn1_22" onClick="document.loginForm.reset()" onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)"><img src="images/ico_sx.gif" border="0" align="texttop"> 重
                              置                            </td>
                            <td class="buttonOffRight" id="btn1_23"></td>
                         </tr>
                        </table></td>
                    </tr>
                </table>				</td>
          </tr>
          </table>          </td>
        </tr>
    </table>

</form>
<script type="text/javascript">
document.loginForm.username.focus();
</script>

</body>
</html>

